Skip to main content

Examples

The submitted payloads have the following structure:

  • Resource identifiers, for example, the client order ID.
  • A Callback Url to the LetsGetChecked server to query for changes.
  • The type determines the resource type. For example, Order or Result.
  • A timestamp in UTC determines the creation of the message. You should use this to check if the event happened before or after your current status.

Order change notification

This is a sample webhook notification for Orders API - Version 1:

{
"body":{
"clientOrderId":"123456789",
"callbackURL":"{LGC-API}/1001/api/v1/orders/123456789/status",
"timestamp":"2022-03-04T11:35:17.43+00:00"
},
"type":"order"
}

This is a sample webhook notification for Orders API - Version 2:

{
"type": "order",
"body": {
"clientOrderId": "246975",
"callbackURL": "{LGC-API}/1111/api/v2/orders/246975",
"orderItemStatus": {
"id": "2fa58516-fc54-4e5d-9349-4865d38f785e",
"status": {
"code": "KitRegistered"
}
},
"timestamp": "2023-05-15T16:22:11.3513804Z"
}
}

Results change notification

{
"body":{
"barcode":"LGC-XXX-XXX-XXX",
"alphaCode":"QWERTY",
"callbackURL":"{LGC-API}/1001/api/v1/results/{Barcode}?alphaCode={AlphaCode}&fields=status",
"timestamp":"2022-03-04T10:33:37.6713587Z"
},
"type":"Result"
}

Outreach change notification

{
"body":{
"barcode":"LGC-XXX-XXX-XXX",
"type": "PcpResultsLetter",
"status": "DeliverySent",
"failureReason": null,
"timestamp":"2022-08-10T11:37:37.6715487Z"
},
"type":"outreach"
}
info

Possible values in the Outreach payload
The body of the payload contains the following information:

  • The LetsGetChecked barcode (numerical test kit code), for example, LGC-1234-1234-1234.
  • The type of notification, for example, PcpResultsLetter or PatientResultsLetter.
  • The status of the notification, for example, DeliverySent.
  • The failureReason. This property is currently not in use and the value is always null.
  • The timestamp for the notification, in UTC format.

Type: the type of API, for example, outreach.